using System;
using System.Threading;
using System.Threading.Tasks;
using JGSY.CourseManagement.Domain.Entities;

namespace JGSY.CourseManagement.Domain.Interfaces
{
    /// <summary>
    /// 用户登录信息,SQLite数据库存储信息
    /// </summary>
    public interface IUserSessionRepository
    {
        /// <summary>
        /// 获取用户登录信息
        /// </summary>
        /// <param name="sessionId">会话ID</param>
        /// <returns>用户登录信息实体</returns>
        Task<UserSession> GetAsync();

        /// <summary>
        /// 添加用户登录信息
        /// </summary>
        /// <param name="session">用户登录信息实体</param>
        /// <returns>添加后的户登录信息实体</returns>
        Task<UserSession> AddAsync(UserSession session);
    }
}